package Study.company;

import java.util.Scanner;

public class Practice05 {
    public static void main(String[] args) {
        //输入一个值n，输出n值所在的下标
        int[] num = {8, 12, 6, 54, 21, 63, 45, 33, 20, 17, 25};
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个n值：");
        boolean num1= true;
        int number = sc.nextInt();
        for (int i = 0; i < num.length; i++) {
            if (number == num[i]) {
                System.out.println("输出：");
                System.out.println(i);
                num1 = false;
            }
        }
        if (num1){
            System.out.println("输出：");
            System.out.println(-1);
        }
    }
}
